package cn.caplike.demo.repository.design.pattern.decorator;

abstract class Decorator implements Component {
    // 定义一个与抽象构件接口一致的装饰器
    private final Component component; // 持有构建角色的引用

    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void doSomething() {
        component.doSomething();
    }
}
